package com.tuocent.dagv2.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tuocent.dagv2.entity.Projects;
import com.tuocent.dagv2.service.IProjectsService;
import com.tuocent.dagv2.service.ITaskService;
import com.tuocent.dagv2.service.IWorkflowService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

import java.util.List;

@Service
@Slf4j
public class WorkflowServiceImpl implements IWorkflowService {
    @Autowired
    private IProjectsService projectsService;
    @Autowired
    private ITaskService taskService;

    @Override
    public String arrangement(Model model) {
        List<Projects> projectsList = projectsService.list(new QueryWrapper<Projects>().eq("is_del", "0"));
        model.addAttribute("projectsList", projectsList);
        return "/workflow/arrangement";
    }
}
